<include file="Public:header" />
<div class="container">
	<div class="page-header">
		<h4>{:L('CUSTOMER_CARE_FOR_DETAILS')}</h4>
	</div>
	<include file="Public:alert"/>
	<div class="row">
		<div class="span12">
			<table class="table table-hover">
				<thead>
					<tr>
						<td <if condition="C('ismobile') neq 1">colspan="4"<else/>colspan="2"</if>>
							<p style="font-size: 14px;">
								<a href="{:U('customer/caresedit', 'id='.$care['care_id'])}">{:L('COMPILE')}</a>&nbsp;|
								<a href="{:U('customer/caresdelete', 'id='.$care['care_id'])}">{:L('DELETE')}</a>&nbsp;|
								<a href="javascript:void(0)" onclick="javascript:history.go(-1)">{:L('RETURN')}</a>
							</p>
						</td>
					</tr>
				</thead>
				<tbody>
					<tr><th <if condition="C('ismobile') neq 1">colspan="4"<else/>colspan="2"</if>>{:L('BASIC_INFORMATION')}</th></tr>
					<tr>
						<td width="15%" class="tdleft">{:L('CUSTOMER')}</td>
						<td width="35%"><a href="{:U('customer/view','id='.$care['customer']['customer_id'])}">{$care.customer.name}</a></td>	
						<if condition="C('ismobile') eq 1"></tr><tr></if>
						<td width="15%" class="tdleft">{:L('LINKMAN')}</td>
						<td width="35%"><a href="{:U('contacts/view','id='.$care['contacts']['contacts_id'])}">{$care.contacts.name}</a></td>
					</tr>
					<tr>
						<td class="tdleft" width="15%">{:L('CARE_THEME')}</td>
						<td width="35%" >{$care.subject}</td>
						<if condition="C('ismobile') eq 1"></tr><tr></if>
						<td class="tdleft" width="15%">{:L('DATE_OF_CARE')}</td>
						<td width="35%" >
							<if condition="$care.care_time gt 0">{$care.care_time|date='Y-m-d H:i',###}</if>
						</td>
					</tr>						
					<tr>
						<td class="tdleft">{:L('OPERATOR')}</td>
						<td>
							<notempty name="care.owner.user_name"><a class="role_info" rel="{$care.owner.role_id}" href="javascript:void(0)">{$care.owner.user_name}</a></notempty>
						</td>
						<if condition="C('ismobile') eq 1"></tr><tr></if>
						<td class="tdleft" >{:L('CARING_TYPE')}</td>
						<td><if condition="$care['type'] == 'message'">
												{:L('NOTE')}
											<elseif condition="$care['type'] == 'phone'"/>
												{:L('PHONE')}
											<elseif condition="$care['type'] == 'email'"/>
												{:L('EMAIL')}
											<elseif condition="$care['type'] == 'other'"/>
												{:L('OTHER')}
											<else/>
												{:L('NONE')}
											</if></td>
					</tr>
					<tr>
						<td class="tdleft">{:L('CREATION_TIME')}</td>
						<td><if condition="$care['create_time'] neq 0">{$care.create_time|date='Y-m-d H:i:s',###}</if></td>
						<if condition="C('ismobile') eq 1"></tr><tr></if>
						<td class="tdleft">{:L('MODIFICATION_TIME')}</td>
						<td><if condition="$care['update_time'] neq 0">{$care.update_time|date='Y-m-d H:i:s',###}</if></td>
					</tr>
					<tr>
						<td class="tdleft">{:L('CARE_CONTENT')}</td>
						<td <if condition="C('ismobile') neq 1">colspan="3"</if>><notempty name="care.content"><pre>{$care.content}</pre></notempty></td>
					</tr>
					<tr>
						<td class="tdleft" >{:L('REMARK')}</td>
						<td <if condition="C('ismobile') neq 1">colspan="3"</if>><notempty name="care.description"><pre>{$care.description}</pre></notempty></td>
					</tr>
				</tbody>
			</table>
		</div>
	</div>
</div>
<div class="hide" id="dialog-role-info" title="{:L('EMPLOYEE_INFORMATION')}">loading...</div>
<script type="text/javascript">
<if condition="C('ismobile') eq 1">width=$('.container').width() * 0.9;<else />width=800;</if>
$("#dialog-role-info").dialog({
    autoOpen: false,
    modal: true,
	width: width,
	maxHeight: 400,
	position: ["center",100]
});
$(function(){
	$(".role_info").click(function(){
		$role_id = $(this).attr('rel');
		$('#dialog-role-info').dialog('open');
		$('#dialog-role-info').load('{:U("user/dialoginfo","id=")}'+$role_id);
	});
});
</script>
<include file="Public:footer" />